#define  _CRT_SECURE_NO_WARNINGS


#include<stdio.h>
#include<string.h>


int main()
{
    char n = 0;
    while (scanf("%c", &n) != EOF)
    {
        char arr[11][5] = { "abc","def","ghi","jkl","mno","pqrs","tuv","wxyz" };
        int len = 0, i = 0, j = 0;
        if (n >= 'A' && n <= 'Z')
        {
            if (n >= 'A' && n <= 'Y')
                printf("%c", n + 33);
            else
                printf("a");
        }
        else if (n >= 'a' && n <= 'z')
        {
            for (i = 0; i < 10; i++)
            {
                len = strlen(arr[i]);
                for (j = 0; j < len; j++)
                {
                    if (arr[i][j] == n)
                    {
                        printf("%c", i + 2 + '0');
                        goto end;
                    }
                }
            }
        }
        else
            printf("%c", n);
    end:;
    }

    return 0;
}